package com.hita.tata.bbs.account.dao;

import com.hita.tata.bbs.account.param.request.LoginForm;
import com.hita.tata.bbs.account.param.response.LoginResponse;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface AccountRepository {

	@Results({
			@Result(column = "id",property = "userId"),
			@Result(column = "userName",property = "userName"),
			@Result(column = "nickName",property = "nickName")
	})
	@Select("select * from bbs_user where id = #{userId} and password = #{password}")
	LoginResponse checkLogin(LoginForm loginForm);
}
